import { get, post, postToFile, getToFile } from "./tools/axios";

//请求后端前缀
export const API_PREFIX = "huazhi";

const api = {
    //登录
    login: params => post(`/${API_PREFIX}/user/login`, params),
   
    register: params => post(`/${API_PREFIX}/user/register`, params),

    //信息维护
    xxwh: params => post(`/${API_PREFIX}/user/updateuser`, params),

    //维护信息回填
    xlxxDetail: params => get(`/${API_PREFIX}/user/finduserByid`, params),

    //线路信息
    xlxx: params => post(`/${API_PREFIX}/xlxx/list`, params),

    //线路预约
    order: params => get(`/${API_PREFIX}/xlxx/order`, params),

    //预定信息
    ydxx: params => post(`/${API_PREFIX}/ydxx/page`, params),

    //取消预定
    cancelOrder: params => get(`/${API_PREFIX}/ydxx/cancel`, params),

    //车辆信息
    clxx: params => post(`/${API_PREFIX}/clxx/list`, params),

    // 新增车辆
    addClxx: params => post(`/${API_PREFIX}/clxx/add`, params),

    // 编辑车辆
    editClxx: params => post(`/${API_PREFIX}/clxx/update`, params),

    // 线路信息
    lxxx: params => post(`/${API_PREFIX}/lxxx/list`, params),
    

    // 新增线路
    addXlxx: params => post(`/${API_PREFIX}/lxxx/add`, params),

    // 编辑线路
    editXlxx: params => post(`/${API_PREFIX}/lxxx/update`, params),

    // 用户管理
    yhgl: params => post(`/${API_PREFIX}/user/list`, params),

    // 新增用户
    addUser: params => post(`/${API_PREFIX}/user/add`, params),

    // 编辑用户
    editUser: params => post(`/${API_PREFIX}/user/update`, params),

    //预定信息
    ydxxs: params => post(`/${API_PREFIX}/ydxxs/page`, params),

    busDetails: params => post(`/${API_PREFIX}/busDetails/list`, params),
}
export default api;